package com.heima.wemedia.controller.v1;

import com.heima.model.common.dtos.ResponseResult;
import com.heima.model.wemedia.dtos.WmStatistics2Dto;
import com.heima.model.wemedia.dtos.WmStatisticsDto;
import com.heima.wemedia.service.WmArticleStatisticsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/api/v1/statistics")
public class WmGraphicStatisticsController {


    @Autowired
    private WmArticleStatisticsService wmArticleStatisticsService;

    @GetMapping("/newsDimension")
    public ResponseResult newsDimension(WmStatisticsDto dto){
        return wmArticleStatisticsService.newsDimension(dto);
    }

    @GetMapping("/newsPage")
    public ResponseResult newsPage(WmStatistics2Dto dto){
        return wmArticleStatisticsService.newsPage(dto);
    }
}
